import Router from 'koa-router';
import DlyUser from "../controller/dlyuser";

const router = new Router();

router.prefix('/api/dlyuser');

router

// 公共登录接口用于获取体验情况下用户数据
  /**
  * @swagger
  * /api/dlyuser/code:
  *   get: 
  *     description: 获取验证码 用于登陆注册
  *     tags: [AI用户] 
  *     summary: "获取验证码"
  *     parameters:
  *             - in: query
  *               name: phone
  *               description: 手机号
  *               required: true
  *               type: string
  *               default: 13812345678
  *     produces: 
  *       - application/json 
  *     responses: 
  *       200:
  *         description: 获取数据列表 
  * */
  .get('/code', DlyUser.code)
   /**
   * @swagger
   * /api/dlyuser/creted:
   *   post: 
   *     description: 提交注册 || 登陆 
   *     tags: [AI用户] 
   *     summary: "提交注册 || 登陆 "
   *     parameters:
   *           - in: body
   *             name: phone
   *             description: 手机号
   *             required: true
   *             type: string
   *             default: 13812345678
   *           - in: body
   *             name: code
   *             description: 验证码
   *             required: true
   *             type: string
   *             default: 123456
   *     produces: 
   *       - application/json 
   *     responses: 
   *       200:
   *         description: 获取数据列表 
   * */
   .post('/creted', DlyUser.creted)
    /**
   * @swagger
   * /api/dlyuser/bindinfo:
   *   get: 
   *     description: 绑定的店铺信息
   *     tags: [绑定的店铺信息] 
   *     summary: 绑定的店铺信息
   *     parameters:
   *     produces: 
   *       - application/json 
   *     responses: 
   *       200:
   *         description: 获取数据列表 
   * */
    .get('/bindinfo', DlyUser.bindinfo)
  /**
  * @swagger
  * /api/dlyuser/userinfo:
  *   get: 
  *     description: 获取用户信息
  *     tags: [抖羚羊用户] 
  *     summary: "获取用户信息"
  *     parameters:
  *     produces: 
  *       - application/json 
  *     responses: 
  *       200:
  *         description: 获取数据列表 
  * */
  .get('/userinfo', DlyUser.userinfo)
  /**
  * @swagger
  * /api/dlyuser/setUserInfoData:
  *   get: 
  *     description: 修改配置
  *     tags: [抖羚羊用户] 
  *     summary: "修改配置"
  *     parameters:
  *     produces: 
  *       - application/json 
  *     responses: 
  *       200:
  *         description: 获取数据列表 
  * */
  .post('/setUserInfoData', DlyUser.setUserInfoData)
    /**
  * @swagger
  * /api/dlyuser/upcheackcoupstatus:
  *   get: 
  *     description: 修改配置
  *     tags: [抖羚羊用户] 
  *     summary: "修改配置"
  *     parameters:
  *     produces: 
  *       - application/json 
  *     responses: 
  *       200:
  *         description: 获取数据列表 
  * */
  .post('/upcheackcoupstatus', DlyUser.upcheackcoupstatus)
    /**
  * @swagger
  * /api/dlyuser/buySmsNums:
  *   get: 
  *     description: 购买短信
  *     tags: [抖羚羊用户] 
  *     summary: "购买短信"
  *     parameters:
  *     produces: 
  *       - application/json 
  *     responses: 
  *       200:
  *         description: 获取数据列表 
  * */
    .post('/buySmsNums', DlyUser.buySmsNums)
    /**
  * @swagger
  * /api/dlyuser/getBuyCounpStatus:
  *   get: 
  *     description: 获取用户订购自动设置优惠券信息
  *     tags: [抖羚羊用户] 
  *     summary: "获取用户订购自动设置优惠券信息"
  *     parameters:
  *     produces: 
  *       - application/json 
  *     responses: 
  *       200:
  *         description: 获取数据列表 
  * */
  .get('/getBuyCounpStatus', DlyUser.getBuyCounpStatus)

export default router;